This page last changed on Nov 27, 2005 by vidya.

Templates are written in the same notation as other pages in Confluence with special markup to insert form fields.

Here are the three kinds of form fields supported and the markup to create them:

Text field
@VAR@
Creates a text input field for a variable called VAR
Text area
@VAR|textarea(5x10)@
Creates a 5 x 10 text-area for a variable called VAR
Drop down menu
@VAR|list(one,two,three,four)@
Creates a drop-down box containing the values "one", "two", "three" and "four"

Every input field must have a unique name. If you have more than one text input field in the same template with the same name, Confluence will make sure that they all end up with the same value (This is useful if you need the same information in more than one place in the page).

Warning

There must be no spaces between the @-signs in the markup. This means you can't have items in your drop-down lists that contain spaces.

RELATED TOPICS

Adding a Template
Editing a Template
Creating a Page using a Template

Take me back to Confluence 2.0 Home

I know those form fields from an open-source Wiki. Here I cannot find any information about how to use those form variables after they have been defined for a page. Somewhere you're writing that it's for structuring the content but what can I DO with it?

For example, I would like to create a page which links all pages with the variable "myname". Can I only do this with labels? 

Posted by tattva at Feb 03, 2006 07:57

It would be nice to be able to create a list out of the users within a particular group (similar to what you can do with the {scaffold} plug-in). Something like @VAR|groupmembers(confluence-users) would be good.

Default values for variables would also be high on the basic-additions wishlist.

In general more "special markup" functionality would be great (or more documented functionality, as I suspect there is more than is here).

Posted by rwarren@picarro.com at Mar 01, 2006 15:47

Yes, you can use the {contentbylabel:myname} to do that.

Posted by gfraser at Mar 01, 2006 16:05

Are there some sample templates that use forms? A search isn't so fruitful...

Posted by amyoung at Mar 06, 2006 12:56

Can a dropdown list be created from sql output?

Posted by melogin at Mar 30, 2006 09:52
Document generated by Confluence on Jun 14, 2006 00:27